package com.tian.proxy;

/**
 * @author tiansongtao, Email:tiansongtao@up366.com
 * @date 2020/12/25 10:41
 */
public class ProxySubject {
    private Subject subject;

    public ProxySubject(){
        subject = new Subject();
    }

    public void picture(){
        before();
        subject.picture();
        after();
    }

    private void before(){
        System.out.println("ProxySubject picture before");
    }

    private void after(){
        System.out.println("ProxySubject picture after");
    }

    public void face(){
        System.out.println("ProxySubject picture start");
        subject.picture();
        System.out.println("ProxySubject picture end");
    }

    public void excute(){
        System.out.println("ProxySubject picture start");
        subject.picture();
        System.out.println("ProxySubject picture end");
        System.out.println("ProxySubject picture start");
        subject.picture();
        System.out.println("ProxySubject picture end");
    }
}
